<if condition="$_show">
    <if condition="$_is_pay_reading">
        <div class="sigma-content">
            <div class="sigma-middle-line">
                <span class="sigma-line-text">以下是隐藏内容</span>
            </div>
        </div>
    </if>
    <notempty name="_info.__pay_content">
    	<div style="margin-top:15px;">{$_info.__pay_content}</div>
    </notempty>
<else />
    <div class="text-center" style="width:100%;height:120px;border:dashed 1px #e83522;display: table; background:#fff; margin-top:20px;">
        <div style="display:table-cell;vertical-align:middle;">
            <p style="margin-bottom:5px;">以下内容已隐藏，如需继续阅读，请购买</p>
            <button class="btn btn-primary" onclick="buy({$paymoduleid},{$_info.id})">购买 ￥{$_info.__pay_money}</button>
        </div>
    </div>
    <script>
        function buy(paymoduleid,postid) {
            swal({
                title: "确定购买吗？",
                type: "warning",
                showCancelButton: true,
                confirmButtonColor: "#2780E3",
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                closeOnConfirm: false
            }, function () {
                $.post("{:cmf_url('/plugin/pay_reading/index/buy')}", { paymoduleid: paymoduleid, postid: postid }, function (res) {
                    res = typeof res == 'string' ? JSON.parse(res) : res
                    console.log(res)
                    if (res.code == 0) window.location.reload()
                    else swal('ERROR', res.data, 'error');
                })
            });

        }
    </script>
    <script src="__PLUGIN_TMPL__/public/assets/js/sweetalert-dev.js"></script>
</if>